package com.bidepan.spring6.javai18n;

import java.util.Locale;
import java.util.ResourceBundle;

public class ResourceI18n {
    public static void main(String[] args){
        ResourceBundle bundle = ResourceBundle.getBundle("messages",
                new Locale("zh","CN"));
        String cn =  bundle.getString("test");

        System.out.println(cn);
        ResourceBundle bundle2 = ResourceBundle.getBundle("messages",
                new Locale("en","GB"));
        String gb  = bundle2.getString("test");
        System.out.println(gb);
    }
}
